<template>
  <div class="cardsrz-container">
    <el-card class="cards_box">
      <div slot="header" class="clearfix">
        <span>写日志</span>
        <el-button style="float: right; padding: 3px 0" type="text" @click.native="torz">X</el-button>
      </div>
      <div class="bottoncontrnt">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="日报" name="first">
            <div class="textsold">
              <p>本月工作内容:</p>
              <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.content"></el-input>
            </div>
            <div class="textsold">
              <p>下月工作内容:</p>
              <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.textarea2"></el-input>
            </div>
            <div class="textsold">
              <p>遇到的问题:</p>
              <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="form.textarea3"></el-input>
            </div>
            <div class="phtops">
              <p>添加图片</p>
              <div class="upphoto">+</div>
              <p>添加附件</p>
              <footer>
                <el-button type="primary" style="padding:10px ;" @click="toset">发送</el-button>
                <el-button type="info" style="padding:10px ;">取消</el-button>
              </footer>
            </div>
          </el-tab-pane>
          <el-tab-pane label="周报" name="second">配置管理</el-tab-pane>
          <el-tab-pane label="月报" name="third">角色管理</el-tab-pane>
        </el-tabs>
      </div>
    </el-card>
  </div>
</template>

<script>
import http from "@/util/http.js";
export default {
  name: "cards_rz02",
  data() {
    return {
      activeName: "first",
      form: {
        value: "",
        category_id: "",
        content: "",
        tomorrow: "",
        question: "",
      },
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    toset() {
      http.post("oa/log/save", this.form).then((res) => {
        console.log(res);

        this.$router.push("/office/rz");
      });
    },
    torz() {
      this.$router.push("/office/rz");
    },
  },
  created() {
    http.post("oa/log/index").then((data) => {
      console.log(data);
      this.list = data.data.data.list;
    });
  },
  components: {},
};
</script>

<style scoped lang='scss'>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.bottoncontrnt {
  height: 600px;
  overflow-y: scroll;
}
.cardsrz-container {
  background-color: #f5f6f9;
  width: 100%;
  position: relative;
  height: 100%;
  padding: 40px 380px;
  .cards_box {
    width: 700px;
  }
  .textsold {
    margin: 10px 0;
    padding: 15px 30px;
    p {
      font-size: 12px;
      padding: 10px 0;
    }
  }
}
.phtops {
  p {
    font-size: 12px;
    color: #409eff;
  }
  .upphoto {
    width: 80px;
    height: 80px;
    border: 1px dashed #000;
    margin: 15px 30px;
    text-align: center;
    line-height: 80px;
  }
  footer {
    height: 50px;
    float: right;
  }
}
</style>
